home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11281 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.3 KB  |  53 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!milod
  3. From: milod@netcom.com (John DiCamillo)
  4. Subject: Re: Will JAVA kill C++?
  5. Message-ID: <milodDo7x6B.Aw2@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <31426210.1244@bhp.com.au> <1996Mar12.155442.1839@amc.com> <31462922.21F4A8BD@netcom.com> <4i68mo$ajp@soap.news.pipex.net>
  8. Date: Wed, 13 Mar 1996 18:10:59 GMT
  9. Sender: milod@netcom16.netcom.com
  10.  
  11. Dirk Wessels <dirk@oxigen.demon.co.uk> writes:
  12. >Adam Megacz <kalessin@netcom.com> wrote:
  13. >>Curtis Green wrote:
  14. >>
  15. >>> code reliablity is more a function of programmer ability than language
  16. >>> features.  I agree that C++ is woefully missing garbage collection but
  17. >>> you can pick up class libraries with those features.  A lousy programmer can
  18. >>> write lousy programs in any language.
  19. >>
  20. >>Amen. Also, I believe that every feature in Java can be had in C++
  21. >>merely by adding class libraries and choosing not to use pointers. As
  22. >>for the bytecode stuff, ANDF works just fine for C++. Does anyone know
  23. >>of a feature in Java that C++ can't do (w/o some extra source code)? I'd
  24. >>like to know!
  25.  
  26. Uh, create web applets that run in Netscape?
  27.  
  28. >I think you are both missing the point here.
  29. >Java works with references, just like Delphi and Smalltalk.
  30. >C++ works with actual addresses, which do not necessary point to
  31. >objects but also to strings, booleans or start of an array.
  32. >Since any addess may point to something unknown, you can not have
  33. >safe garbage collection. 
  34. >The only thing to perform garbage collection in C++ is to use classes
  35. >that handle the references instead of pointers. This is much slower, 
  36. >can still easily be misused. And are often not fully functional 
  37. >(reference counting).
  38. >Garbage collecting is as good in C++ as in C and Assembler!!
  39.  
  40. Depending on what you mean by "in C++", this is not correct.
  41. It is possible to buy (or just download) conservative GC
  42. libraries that work with both C and C++.  Of course, these
  43. libraries are not written completely in C++, in the sense
  44. that they include embedded assembly code to access the
  45. machine stack.
  46.  
  47. -- 
  48.     ciao,
  49.     milo
  50. ================================================================
  51.     John DiCamillo                         Fiery the Angels Fell 
  52.     milod@netcom.com       Deep thunder rode around their shores
  53.